<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/5/2
 * Time: 10:05
 */

namespace app\index\controller;


use think\Controller;

class BaseController  extends Controller
{
    public function index()
    {
        $controllerName=$this->request->controller();
        $controllerName=humpToLine($controllerName);
        $files = readFileNames(__DIR__."/../view/$controllerName");
        foreach ($files as $key=>$file) {
            $files[$key]=str_replace(".html","",$file);
        }
        $this->assign("controller",$controllerName);
        $this->assign("files",$files);
        return $this->fetch('base/base-index');
    }

    function _empty($name)
    {
        $name=iconv('UTF-8','GB2312',$name);
        return view($name);
    }
}